﻿#pragma once
#ifndef BLOCK_H
#define BLOCK_H
#include <QToolButton>
#include <QIcon>

class Block : public QToolButton
{
    Q_OBJECT
private:
    //三态按钮用于展示方块的不同状态
    QIcon normalState;
    QIcon activeState;
    QIcon emptyState;
    //判断方块是否为激活态
    bool curState;
public:
    Block();
    ~Block(){}
    //设置方块图案
    void setBlock(QIcon nrm, QIcon act);
    //设置玩家图案
    void setPlayer(QIcon plr);
    //将方块刷新为普通态
    void flushBlock();
    //将方块清空
    void clearBlock();
    //改变方块状态
    void changeState();

};

#endif // BLOCK_H
